home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 424_02 / ED-157 / configure < prev    next >
Text File  |  1993-11-30  |  1KB  |  48 lines

  1. #! /bin/csh
  2. rm -f compiler config.h
  3. echo -n "How do you run the C-compiler on this system (example: cc)? "
  4. echo
  5. set compile=$<
  6. echo -n "What flags do you pass to the compiler (example: -O)? "
  7. echo
  8. set cflags=$<
  9. echo "Creating 'compiler'..."
  10. echo "CC=$compile" >compiler
  11. echo "CFLAGS=$cflags" >> compiler
  12. cat compiler
  13. echo -n "Does your compiler understand the 'signed' keyword (y,n)? "
  14. echo
  15. set signed=$<
  16. echo -n "Does your C library include the 'mmap' and 'munmap' routines (y,n)? "
  17. echo
  18. set mmap=$<
  19. echo -n "Does your C library include a working 'sbrk' routine (y,n)? "
  20. echo
  21. set sbrk=$<
  22. echo -n "Does your system support FTP (y,n)? "
  23. echo
  24. set ftp=$<
  25. echo -n "Does your system have access to a news server (y,n)? "
  26. echo
  27. set news=$<
  28. #echo "Checking for 'ranlib'..."
  29. #echo "main(){char a;}" >test.c
  30. #$compile -c test.c
  31. #ar cq test.a test.o
  32. #ranlib test.a >&test.out
  33. #set ranlib=0
  34. #if ( -z test.out ) then
  35. #    echo "rlib=ranlib" >>compiler
  36. #else
  37. #    echo "rlib=echo" >>compiler
  38. #endif
  39. #rm -f test.c test.o test.a
  40. echo "Creating 'config.h'..."
  41. echo "/* This file was created by the 'configure' procedure.*/" >config.h
  42. if ( $signed == 'n' || $signed == 'N' ) echo "#define NO_SIGNED_CHAR" >>config.h
  43. if ( $mmap == 'n' || $mmap == 'N' ) echo "#define NO_MMAP" >> config.h
  44. if ( $sbrk == 'n' || $sbrk == 'N' ) echo "#define NO_SBRK" >> config.h
  45. if ( $ftp == 'n' || $ftp == 'N' ) echo "#define NO_FTP" >> config.h
  46. if ( $news == 'n' || $news == 'N' ) echo "#define NO_NEWS" >> config.h
  47. cat config.h
  48.